package com.skycong.hello77.viewmodel;

import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.skycong.hello77.R;
import com.skycong.hello77.entity.ApkEntity;

public class ProductCustomerView extends RecyclerView.ViewHolder {
    private TextView tv_customer_name;//店主名称
    private TextView tv_customer_address;//店铺名称
    private TextView tv_distance;//坐标距离
    private RelativeLayout all_location;//定位
    public ProductCustomerView(View itemView) {
        super(itemView);
        tv_customer_address = (TextView) itemView.findViewById(R.id.tv_customer_address);
        tv_customer_name = (TextView) itemView.findViewById(R.id.tv_customer_name);
        tv_distance = (TextView) itemView.findViewById(R.id.tv_distance);
        Log.i("aaa", "find view tv_distance id = "+R.id.tv_distance + "");
    }
    //与外界的数据进行绑定
    public void cust(ApkEntity data){
        Log.i("aaa","data from get distance = "+ data.getCustom_distance().toString());
//        tv_distance.setText(data.getCustom_distance());
        tv_customer_name.setText(data.getCustom_name());
        tv_customer_address.setText(data.getCustom_address());
    }
}
